//
//  YLJTools.h
//  ACE
//
//  Created by Mickey Yin on 2021/12/6.
//

#import <Foundation/Foundation.h>
#import <UIKit/UIKit.h>

NS_ASSUME_NONNULL_BEGIN

@interface YLJTools : NSObject

//手机号有效性
- (BOOL)ht_isMobileNumber;
//邮箱
- (BOOL)ht_isEmail;
//身份证号
- (BOOL)ht_simpleIDCard;
//车牌
- (BOOL)ht_isCarNumber;
//Mac地址
- (BOOL)ht_isMacAddress;
//网址
- (BOOL)ht_isValidUrl;
//中文
- (BOOL)ht_isValidChinese;
//邮编
- (BOOL)ht_isPostalcode;
//工商税号
- (BOOL)ht_isTaxNo;

#pragma mark 正则匹配URL
+ (BOOL)checkURL:(NSString*)url;

#pragma mark 正则匹配身份证号
+ (BOOL)checkUserIdCard:(NSString*)idCard;

#pragma mark 正则匹配手机号
+ (BOOL)checkTelNumber:(NSString*)telNumber;

#pragma mark 正则匹配用户密码 6-18位数字和字母组合
+ (BOOL)checkPassword:(NSString*)password;

#pragma mark 正则匹配用户姓名,20位的中文或英文
+ (BOOL)checkUserName:(NSString*)userName;

#pragma mark NSDate 转 字符串日期  2019-04-19 10:33:35
+ (NSString *)jxbUTCStringFromUTCDate:(NSDate *)UTCDate;

#pragma mark 参数:时间戳 返回值格式:2019-04-19 10:33:35.886
+ (NSString *)jxbUTCStringFromTimestamp:(NSString*)mStr;

#pragma mark 将当前时间 UTCDate 转为时间戳
+ (NSString *)jxbTimeStampFromUTCDate:(NSDate *)UTCDate;

#pragma mark md5
+ (NSString *)md5Str:(NSString *)md5str;

#pragma mark 字典转json字符串方法
+ (NSString *)jxbConvertToJsonData:(NSDictionary *)dict;

#pragma mark NSUserDefaults 存、取
+ (void)setNSUserDefaults:(NSInteger)valueText key:(NSString *)keyText;
+ (NSUInteger)getNSUserDefaults:(NSString *)keyText;

#pragma mark 中文url  编码
+ (NSString *)chineseCharacterCode:(NSString *)url;


+ (NSString *)dateToString:(NSDate *)timeDate;
+ (NSString *)getTimestampWithDate:(NSString *)timeStr;
+ (NSString *)getTimestampFromTime:(NSString *)startTime;
//参数:时间戳
//返回值格式:2019-04-19 10:33:35.886
+ (NSString *)jxbGetTimestamp:(NSString*)mStr;
+ (NSString *)textDateToDayStr;

@end

NS_ASSUME_NONNULL_END
